#GP0 ,GND 接一个开关。获取当前接通的状态 0：为接通，1为断开

from machine import Pin
import time
button = Pin(0,Pin.IN,Pin.PULL_UP)

while True:
    print(button.value())
    time.sleep(1)